/*
package 数据结构.树形结构;

public class RBTree<T extends Comparable<T>> {
	public static void main(String[] args) {

	}

	private final RBTreeNode<T> root;
	//node number
	private java.util.concurrent.atomic.AtomicLong size =
			new java.util.concurrent.atomic.AtomicLong(0);
	//in overwrite mode,all node's value can not  has same	value
	//in non-overwrite mode,node can have same value, suggest don't use non-overwrite mode.
	private volatile boolean overrideMode = true;

	// constructor
	public RBTree() {
		this.root = new RBTreeNode<T>();
	}

	// constructor
	public RBTree(boolean overrideMode) {
		this();
		this.overrideMode = overrideMode;
	}

	public boolean isOverrideMode() {
		return overrideMode;
	}
	public void setOverrideMode(boolean overrideMode) {
		this.overrideMode = overrideMode;
	}

	*/
/**
	 * number of tree number
	 * @return
	 *//*

	public long getSize() {
		return size.get();
	}
	public T addNode(T value){
		RBTreeNode<T> t = new RBTreeNode<T>(value);
		return addNode(t);
	}
	*/
/**
	 * find the value by give value(include key,key used for search,
	 * other field is not used,@see compare method).if this value not exist return null
	 * @param value
	 * @return
	 *//*

	public T find(T value){
		RBTreeNode<T> dataRoot = getRoot();
		while(dataRoot!=null){
			int cmp = dataRoot.getValue().compareTo(value);
			if(cmp<0){
				dataRoot = dataRoot.getRight();
			}else if(cmp>0){
				dataRoot = dataRoot.getLeft();
			}else{
				return dataRoot.getValue();
			}
		}
		return null;
	}
}
*/
